package com.xja.boke.utils;

public class PageResult {
    private Integer code; //状态码 200成功 404未找到 500异常 100无返回值
    private String msg;
    private Object result;

    public PageResult() {
    }

    public PageResult(Integer code, String msg, Object result) {
        this.code = code;
        this.msg = msg;
        this.result = result;
    }
    public static PageResult success(String msg, Object obj){
        return new PageResult(200,msg,obj);
    }
    public static PageResult none(String msg){
        return new PageResult(100,msg,null);
    }
    public static PageResult error(String msg){
        return new PageResult(500,msg,null);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
